export default {
  title: {
    text: '进店人次',
    left: 'center'
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow',
      shadowStyle: {
        color: 'rgba(0, 0, 0, 0.1)'
      }
    },
    formatter (params) {
      let res = ''
      for (let i = 0; i <= params.length - 1; i++) {
        let value = params[i].value + '人'
        let color = params[i].color
        let seriesName = params[i]['seriesName']
        res += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + color + '"></span>' +
          seriesName + ': ' + value + '</br>'
      }
      res = params[0]['axisValue'] + '</br>' + res
      return res
    }
  },
  legend: {
    data: ['今天', '昨天', '7天前', '28天前'],
    bottom: 0
  },
  grid: {
    left: '3%',
    right: '4%',
    // bottom: '3%',
    containLabel: true
  },
  toolbox: {
    feature: {
      saveAsImage: {}
    }
  },
  xAxis: {
    type: 'category',
    boundaryGap: true,
    axisTick: {
      alignWithLabel: true,
      interval: 0
    }
  },
  yAxis: {
    type: 'value',
    name: '进店人次(人次)',
    minInterval: 1,
    // splitLine: { show: false },
    axisTick: {
      show: false
    },
    axisLine: {
      show: false
    }
  },
  series: [
    {
      name: '今天',
      type: 'line',
      showSymbol: false
    },
    {
      name: '昨天',
      type: 'line',
      showSymbol: false
    },
    {
      name: '7天前',
      type: 'line',
      showSymbol: false
    },
    {
      name: '28天前',
      type: 'line',
      showSymbol: false
    }
  ]
}
